package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 
 * @TableName ums_class_course
 */
@TableName(value ="ums_class_course")
@Data
public class UmsClassCourse implements Serializable {
    /**
     * 必修课自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer classCourseId;

    /**
     * 课程编号，由专业编号（4位）+学期信息（6位）+数字（2位）组成
     */
    private String classCourseNo;

    /**
     * 必修课名称
     */
    private String classCourseName;

    /**
     * 必修课的专业编号
     */
    private String classCourseSpecialNo;

    /**
     * 学期信息（年份+第几个学期）
     */
    private String classCourseTermid;

    /**
     * 课程学分
     */
    private Double classCourseCourseScore;

    @TableField(exist = false)
    private List<UmsClassCourseTeach> umsClassCourseTeachList;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsClassCourse other = (UmsClassCourse) that;
        return (this.getClassCourseId() == null ? other.getClassCourseId() == null : this.getClassCourseId().equals(other.getClassCourseId()))
            && (this.getClassCourseNo() == null ? other.getClassCourseNo() == null : this.getClassCourseNo().equals(other.getClassCourseNo()))
            && (this.getClassCourseName() == null ? other.getClassCourseName() == null : this.getClassCourseName().equals(other.getClassCourseName()))
            && (this.getClassCourseSpecialNo() == null ? other.getClassCourseSpecialNo() == null : this.getClassCourseSpecialNo().equals(other.getClassCourseSpecialNo()))
            && (this.getClassCourseTermid() == null ? other.getClassCourseTermid() == null : this.getClassCourseTermid().equals(other.getClassCourseTermid()))
            && (this.getClassCourseCourseScore() == null ? other.getClassCourseCourseScore() == null : this.getClassCourseCourseScore().equals(other.getClassCourseCourseScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClassCourseId() == null) ? 0 : getClassCourseId().hashCode());
        result = prime * result + ((getClassCourseNo() == null) ? 0 : getClassCourseNo().hashCode());
        result = prime * result + ((getClassCourseName() == null) ? 0 : getClassCourseName().hashCode());
        result = prime * result + ((getClassCourseSpecialNo() == null) ? 0 : getClassCourseSpecialNo().hashCode());
        result = prime * result + ((getClassCourseTermid() == null) ? 0 : getClassCourseTermid().hashCode());
        result = prime * result + ((getClassCourseCourseScore() == null) ? 0 : getClassCourseCourseScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", classCourseId=").append(classCourseId);
        sb.append(", classCourseNo=").append(classCourseNo);
        sb.append(", classCourseName=").append(classCourseName);
        sb.append(", classCourseSpecialNo=").append(classCourseSpecialNo);
        sb.append(", classCourseTermid=").append(classCourseTermid);
        sb.append(", classCourseCourseScore=").append(classCourseCourseScore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}